#求n的阶乘


def jieCheng(n):
    jieguo=1
    i=1
    while i<=n:
        jieguo*=1
        i+=1
    print(jieguo)

jieCheng(3)



#使用递归函数计算n的阶乘---函数自己调用自己

def num(n):
    result=1
    if n>=1:
        result=n*num(n-1)  #result=4*num(3)=4 * 3num(2)=4 * 3 *2*num(1)


    else:
        result=1
    return result


print(num(4))